home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
gt_power
/
gtbimd11.zip
/
GTBIMDIR.DOC
< prev
next >
Wrap
Text File
|
1991-02-12
|
6KB
|
131 lines
Documentation for GTBIMDIR version 1.1 12/02/91
Copyright (C) 1990-91 Ted Harper
Free distribution and use of _unmodified_ executable code expressly permitted.
This program is designed to allow universal downloads from BBSs running
GT-Power with the BiModem external protocol. Because of its design, the
normal "files_db" database provided by GT is not usable by BiModem. In the
past, this has meant that files can only be downloaded from one area per
invokation of BiModem, and also that duplicate uploads are not thoroughly
screened.
GTBIMDIR takes advantage of a recently-introduced feature of BiModem which
allows for a list of directories to be searched for requested downloads to be
passed to the driver. This list is determined from GTDIR.BBS and from the
current user's GTUSER.BBS record. At the same time, a list of _all_ directories
accessible to GT is created (BiModem can use this to check for duplicate
uploads).
It is intended that GTBIMDIR is run in BIRX.BAT and BITX.BAT just prior to the
invokation of BiModem in HOST mode. This ensures any on-the-fly changes made
by the sysop to the user's access level (or to GTDIR.BBS) are reflected. The
program searches in the current GTPATH directory for GTUSER.BBS and GTDIR.BBS.
If either cannot be found or opened successfully, the program will abend with
a message and return ERRORLEVEL 1 to DOS.
As GTBIMDIR runs, it builds two output files in the GTPATH (or another user-
specified) directory. These are BIUP.BBS and BIDOWN.BBS - respectively the
list of directories to check for duplicate uploads in, and the list to search
for requested downloads. BiModem is given access to these by means of command
line arguments. Following is a sample BITX.BAT (or BIRX.BAT) - this is also
available in the distribution archive.
GTBIMDIR accepts two parameters, both of which are optional. The first is the
logical access level to be given to users without download permission - this is
explained later in this document. The second is the path for the two output
files - note that if you want to specify an output path, you _must_ code a "No
Downloads" level as well (the parser is pretty dumb <grin>).
The default for the "No Downloads" user level is "Z" and the default output
file path is the GTPATH directory. For most systems, these defaults will be
fine (i.e. you should normally run GTBIMDIR with no arguments), but the options
are there if you need to tweak things.
Sample command lines for GTBIMDIR :-
GTBIMDIR { access level Z to users without d/l, output to GTPATH }
GTBIMDIR z { use access level "z" for users who can't download }
GTBIMDIR Z E:\WORK { use a directory other than GTPATH for output files }
[ start of sample BiModem batch file ]
@echo off
rem
rem Batch file for BIMODEM
rem
H:\gt\gtbimod %1 %2 H:\gt\bimodem\
if errorlevel 4 goto mail
if errorlevel 3 goto host
if errorlevel 2 goto term
goto end
:term
H:\gt\bimodem\bipath H:\gt\bimodem\bimodem.pth
if errorlevel 1 goto end
H:\gt\bimodem\bibat H:\gt\bimodem\bimodem.cfg
if errorlevel 1 goto end
:mail
H:\gt\bimodem\bimodem /P H:\gt\bimodem\bimodem.pth /C H:\gt\bimodem\bimodem.cfg
goto end
:host
H:\gt\bimodem\gtbimdir
if errorlevel 1 goto end
H:\gt\bimodem\bimodem /C H:\gt\bimodem\bimodem.cfg ) This is supposed to
/N %GTPATH%\bidown.bbs /J %GTPATH%\biup.bbs ) be _one_ long line!
:end
[ end of sample BiModem batch file ]
Clearly, you will have to change the path to the GT and BiModem support files
to support your particular configuration.
The way the program works is to get the user's current access level and
privileges from GTUSER.BBS. It then reads GTDIR.BBS and determines what
file areas the user should have download access to (including ones which the
sysop has imposed an "=" condition on) - these are placed in the file
BIDOWN.BBS in the GT directory. At the same time, the paths of _all_ file
areas listed in GTDIR.BBS are placed in BIUP.BBS, which is a list of
directories to check for duplicates before allowing each upload.
Two overrides are placed on the above operation. Firstly, if a user is a sysop
(SY is specified in the entry for their level in GTPASSWD.BBS and therefore in
GTUSER.BBS), they have download access to _all_ file areas listed in GTDIR.BBS.
Secondly, if a user is not permitted to download (neither DN or SY specified),
they are processed by GTBIMDIR as a class "Z" user (or another class specified
on the command line), with download access only to areas of that level or
lower.
At present, GTBIMDIR does _not_ tell BiModem of a time or bytes-to-transfer
limit for the current session. This is not particularly tricky, except that
BiModem expects the limit as a command-line parameter, rather than as the
contents of a text or external configuration file. If people want this feature
included in GTBIMDIR, let me know and I'll modify the program to "spawn"
BIMODEM.COM (so that I have total control over the command line), rather than
execute it as a following line in the BIxx.BAT file.
If you have any suggestions for improving the operation of GTBIMDIR, or find a
<wince shudder> bug, drop me a message at either of the bulletin
boards below :-
The Big Apple The Poet's Dilemma
Sydney, Australia Sydney, Australia
GTNet 302/021 GTNet 302/000
Phone +61 2 764-3410 (24 hrs) Phone +61 2 804-6412 (24 hrs)
ted harper
12-Feb-91
Release History
---------------
0.1 06/02/91 Initial "alpha" release.
1.0 10/02/91 First public release - the alpha went so surprisingly well
that a wider beta test was dispensed with.
1.1 12/02/91 Correctly skip lines in GTDIR not containing path info.;
Two command-line options added per user request (thanks ST).